<?php
use_helper('I18N');
?>
<div class="breadcrumbs" id="breadcrumbs">

<style>
.alignRight{
    text-align: right;
}
</style>
<script>
$(function() {

});
</script>

    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="/member/withdrawal"><?php echo __('Withdrawal') ?></a>
        </li>
        <li class="active"><?php echo __('Withdrawal Status') ?></li>
    </ul>

    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input"
                       id="nav-search-input" autocomplete="off"/>
                <i class="icon-search nav-search-icon"></i>
            </span>
        </form>
    </div>
    <!-- #nav-search -->
</div>

<div class="page-content">

    <div class="row">
        <div class="col-xs-12">
            <h3 class="header smaller lighter green"><?php echo __('History of Withdrawal Request') ?></h3>

            <!-- PAGE CONTENT BEGINS -->
            <?php include_component('component', 'alert', array('param' => $sf_user->getAttribute(Globals::SESSION_DISTID, 0))) ?>

            <script type="text/javascript" language="javascript">
                var datagrid = null;
                $(function() {
                    datagrid = $("#datagrid").r9jasonDataTable({
                        // online1DataTable extra params
                        "idTr" : true, // assign <tr id='xxx'> from 1st columns array(aoColumns);
                        "extraParam" : function(aoData) { // pass extra params to server
                        },
                        "reassignEvent" : function() { // extra function for reassignEvent when JSON is back from server
                            reassignDatagridEventAttr();
                        },

                        // datatables params
                        "bLengthChange": true,
                        "bFilter": false,
                        "bProcessing": true,
                        "bServerSide": true,
                        "bAutoWidth": false,
                        "sAjaxSource": "/finance/withdrawalList",
                        "sPaginationType": "full_numbers",
                        "aaSorting": [
                            [1,'desc']
                        ],
                        "aoColumns": [
                            { "sName" : "payment_reference", "bSortable" : true,  "bSortable": true},
                            { "sName" : "created_on",  "bSortable": true},
                            { "sName" : "game",  "bSortable": true},
                            { "sName" : "status_code",  "bSortable": true},
                            { "sName" : "amount",  "bSortable": true, "sClass":"alignRight"}
                        ]
                    });
                }); // end function

                function reassignDatagridEventAttr() {
                }
            </script>
            <div class="table-header">
                <?php echo __('Withdrawal Status') ?>
            </div>
            <div class="table-responsive">
            <table class="table table-striped table-bordered table-hover" id="datagrid" border="0" width="100%">
                <thead>
                <tr>
                    <th><?php echo __('Reference No.') ?></th>
                    <th><?php echo __('Requested On') ?></th>
                    <th><?php echo __('Game') ?></th>
                    <th><?php echo __('Status') ?></th>
                    <th><?php echo __('Withdrawal Amount') ?></th>
                </tr>
                </thead>
            </table>
            <!-- PAGE CONTENT ENDS -->
        </div>
        <!-- /.col -->
    </div>
</div>